package com.zhny.sensor.service;

import com.zhny.sensor.dao.LabelingRecordRepository;
import com.zhny.sensor.entity.LabelingRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;

/**
 * @Auther: zhy
 * @Date: 2019/11/23
 * @Description: 贴标信息管理服务
 */
@Service
public class LabelingRecordService {

    @Autowired
    private LabelingRecordRepository labelingRecordRepository;

    /**
     * 批量插入采集数据
     *
     * @param labelingRecordList 贴标数据集合
     */
    public void addbatch(List<LabelingRecord> labelingRecordList) {
        labelingRecordRepository.saveAll(labelingRecordList);
    }


    public LabelingRecord findByBarcodeNumber(String barcodeNumber){

        return labelingRecordRepository.findByBarcodeNumber(barcodeNumber);
    }

}
